package com.abhinav;

public class AliasingTest {

	/**
	 * @param args
	 */
	public static void main(String[] args) {
		B[] b = new B[10];
		A[] a = b;
		
		//a[0] = new A();
		
		b[0] = new B();
		b[0].methodParent();

	}

}

class A {
	public void methodParent() {
		System.out.println("method in Parent");
	}
}

class B extends A {
	public void methodParent() {
		System.out.println("override method in Child");
	}

	public void methodChild() {
		System.out.println("method in Child");
	}
}
